<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<style type="text/css">
	#top{
		position:fixed;
		bottom:10px;
		right:15px;
		cursor:pointer;
		display:none;
	}
</style>
<body>
<!-- <img src="logo.jpg" id='img'> -->
<!-- 	<a href="#abc">
	<img src="./picture/top.jpg">
	</a> -->

<div id="top">
	<img src="./picture/top.jpg">
</div>
<a href="" name='abc'></a>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
<h2>aaaaaaaaaaa</h2>
</body>
<script type="text/javascript">
	//区分浏览器内核来解决兼容性问题
	//谷歌  w=document.body.scollTop;
	// 非谷歌 w=document.documentElement.scollTop;

	function is(){
		nu=navigator.userAgent;
		if(nu.match(/chrome/i)){
			return true;
		}else{
			return false;
		}
	}
	
	topobj=document.getElementById('top');
	window.onscroll=function(){
		if(is()){
			w=document.body.scrollTop;
				if(w>100){
					topobj.style.display='block';
				}else{
					topobj.style.display='none';
				}		
		}else{
			 w=document.documentElement.scrollTop;
				if(w>100){
					topobj.style.display='block';
				}else{
					topobj.style.display='none';
				}	
		}
	
	}
topobj=document.getElementById('top');
topobj.onclick=function(){
	if(is()){
		document.body.scrollTop=0;
	}else{
			document.documentElement.scrollTop=0;
		}
}


	// imgobj=document.getElementById('img');
	// imgobj.onerror=function(){//当图片加载失败时执行函数体 }
	



	// function show(){
	// 		w=document.documentElement.clientWidth;
	// 		if(w>900){
	// 			document.body.style.background='#f0f';
	// 		}else if(w>600){
	// 			document.body.style.background='#f00';
	// 		}	
	// }
	// show();
	// window.onresize=function(){
	// //window.open('http://www.baidu.com');
	// show();
	// }



	// imgobj.onload=function(){
	// 	w=this.clientWidth;
	// 	y=this.clientHeight;
	// 	alert(w+'-'+y);
	// }
</script>
</html>